package com.itheima.springboot.controller;

import com.itheima.springboot.controller.mapper.mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class Controller {
    @Autowired
    private mapper dao;
    @Value("${name}")
    private String name;
    @Value("${msg1}")
    private String msg1;
    @Value("${msg2}")
    private String msg2;
    @Value("${address[0]}")
    private String address;
    @RequestMapping("/add")
    public String add(){
        System.out.println(dao.findAll());
        System.out.println(name);
        System.out.println(msg1);
        System.out.println(msg2);
        System.out.println(address);
        return "hello spring boot!";
    }
}
